package cn.cpf.exercise.consumer.ctrl;

import cn.cpf.exercise.consumer.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * <b>Description : </b>
 *
 * @author CPF
 * Date: 2020/3/17 11:28
 */
@RestController
public class ProductController {

    @Autowired
    private ProductService productService;

    @GetMapping("/payed/{a}")
    public String getCost(@PathVariable("a") int a) {
        return "该产品: " + productService.getCost(a);
    }

}
